package com.ruoyi.monitor.service;

import java.util.List;
import java.util.Set;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.monitor.domain.Pollutant;

/**
 * 污染物Service接口
 * 
 * @author xzx
 * @date 2023-01-04
 */
public interface IPollutantService extends IService<Pollutant>
{

    public List<Pollutant> trainList(Integer limit);

    /**
     * 最近一周aqi
     * @return
     */
    public List<Pollutant> selectLatestDays(Integer days);


    public Pollutant selectLatestPollutant();

    /**
     * 查询24小时，1周，一个月的平均数据
     * @return 集合
     */

    public List<Pollutant> selectByMulAverage();

    public Pollutant CountAVGDay();
    //所有运算
    public Set<Pollutant> CountAVGDayAll();

    public Pollutant CountAVGWeek();
    public Set<Pollutant> CountAVGWeekAll();

    public Pollutant CountAVGMonth();
    public Set<Pollutant> CountAVGMonthAll();

    public List<Pollutant> selectPollutantList();

    public List<Pollutant> selectPollutantListCondition(Pollutant pollutant);

    /**
     * 新增污染物
     * 
     * @param pollutant 污染物
     * @return 结果
     */
    public int insertPollutant(Pollutant pollutant);

    public Pollutant findPollutant(Pollutant pollutant);


}
